<?php


namespace Frieza\Modules\RiskContent\Actions;

use Doraemon\cache\ToBan;
use Doraemon\model\AdmOperateLog;
use Encore\Admin\Actions\RowAction;
use Encore\Admin\Facades\Admin;
use Illuminate\Http\Request;

class Prohibit extends RowAction
{
    public $name = '拒绝';
    const TOAST_ALERT = '你确定要忽略此用户吗？';

    public function handle($uid)
    {
        $res = false;
        if ($res) {

            return $this->response()->success('已忽略该用户')->refresh();
        } else {
            return $this->response()->error('操作失败,稍后重111试!');
        }


    }

    public function retrieveModel(Request $request)
    {
        if (!$key = $request->get('_key')) {
            return false;
        }

        return $key;
    }


    public function form()
    {
        $type = [
            1 => '广告',
            2 => '违法',
            3 => '钓鱼',
        ];

        $this->checkbox('type', '类型')->options($type);
        $this->textarea('reason', '原因')->rules('required');
    }
}